<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>处理交互式的流</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="wrappers.audio.html">« ogg://</a></li>
      <li style="float: right;"><a href="security.html">安全 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="wrappers.html">支持的协议和封装协议</a></li>
    <li>处理交互式的流</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="wrappers.expect" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">expect://</h1>
  <p class="refpurpose"><span class="refname">expect://</span> &mdash; <span class="dc-title">处理交互式的流</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-wrappers.expect-description">
  <h3 class="title">说明</h3>
  <p class="para">
   由 <var class="filename">expect://</var> 封装协议打开的数据流
    PTY 通过提供了对进程 stdio、stdout 和 stderr 的访问。
  </p>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <strong>该封装协议默认未开启</strong><br />
   <span class="simpara">
    为了使用 <var class="filename">expect://</var> 封装器，你必须安装 
    <a href="https://pecl.php.net/" class="link external">&raquo;&nbsp;PECL</a> 上的 <a href="https://pecl.php.net/package/expect" class="link external">&raquo;&nbsp;Expect</a> 扩展。
   </span>
  </p></blockquote>
  <p class="simpara"><var class="filename">expect://</var> (PECL) </p>
 </div>


 <div class="refsect1 usage" id="refsect1-wrappers.expect-usage"> 
  <h3 class="title">用法</h3>
  <ul class="itemizedlist">
   <li class="listitem"><span class="simpara"><var class="filename">expect://command</var></span></li>
  </ul>
 </div>
 

 <div class="refsect1 options" id="refsect1-wrappers.expect-options">
  <h3 class="title">可选项</h3>
  <p class="para">
   <table class="doctable table">
    <caption><strong>封装协议概要</strong></caption>
    
     <thead>
      <tr>
       <th>属性</th>
       <th>支持</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>受 <a href="filesystem.configuration.html#ini.allow-url-fopen" class="link">allow_url_fopen</a> 影响</td>
       <td>No</td>
      </tr>

      <tr>
       <td>允许读取</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>允许写入</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>允许添加</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>允许同时读和写</td>
       <td>No</td>
      </tr>

      <tr>
       <td>支持 <span class="function"><a href="function.stat.html" class="function">stat()</a></span></td>
       <td>No</td>
      </tr>

      <tr>
       <td>支持 <span class="function"><a href="function.unlink.html" class="function">unlink()</a></span></td>
       <td>No</td>
      </tr>

      <tr>
       <td>支持 <span class="function"><a href="function.rename.html" class="function">rename()</a></span></td>
       <td>No</td>
      </tr>

      <tr>
       <td>支持 <span class="function"><a href="function.mkdir.html" class="function">mkdir()</a></span></td>
       <td>No</td>
      </tr>

      <tr>
       <td>支持 <span class="function"><a href="function.rmdir.html" class="function">rmdir()</a></span></td>
       <td>No</td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>
 

 <div class="refsect1 examples" id="refsect1-wrappers.expect-examples">
  <h3 class="title">范例</h3>
 </div>


</div></div></div></body></html>